<template>
	<view>
		<hd-navbar title="订单" :showInput="false"></hd-navbar>
		<view class="pt-250 text-gray-800 text-lg flex flex-col justify-center items-center">
			<view class="flex items-center flex-col text-red-600 justify-center text-xl">
				<u-icon name="checkmark-circle" size="150" class="mr-20"></u-icon>
				<text class="text-gray-500">订单提交成功</text>
			</view>
			<button type="primary" class="mt-30" size="mini">查看订单列表</button>
		</view>
		<button type="default" @click="wepay">支付..</button>
		<hd-tabbar></hd-tabbar>
	</view>
</template>

<script>
	export default {
		methods: {
			async wepay() {
				const payInfo = await this.$api.post(`pay?client=miniapp&type=wepay`,{
				});
				uni.requestPayment({
					provider: 'wxpay',
					...payInfo,
					success: function(res) {
						console.log('success:' + JSON.stringify(res));
					},
					fail: function(err) {
						console.log('fail:' + JSON.stringify(err));
					}
				});
			}
		}
	}
</script>

<style>

</style>
